ifcopenshell.api.cogo
¶
Coordinate Geometry (cogo) functions primarily for survey points and control monument for layout, parcels, etc.
Submodules¶
Package Contents¶
- ifcopenshell.api.cogo.add_survey_point(file: ifcopenshell.file, survey_point: ifcopenshell.entity_instance, site: ifcopenshell.entity_instance | None = None) ifcopenshell.entity_instance ¶
Adds a single survey point to the model based on IFC Concept Template 4.1.7.1.2.5. Survey points are located relative to IfcRepresentationContext.WorldCoordinateSystem
- Parameters:
survey_point – The survey point
- Returns:
an IfcAnnotation entity
Example:
annotation = ifcopenshell.api.cogo.add_survey_point(file,file.createIfcCartesianPoint(4000.0,3500.0)))
- ifcopenshell.api.cogo.assign_survey_point(annotation: ifcopenshell.entity_instance, survey_point: ifcopenshell.entity_instance)¶
Assigns a coordinate point to a survey point annotation
- Parameters:
annotaton – The survey point annotation
survey_point – The survey point
- Returns:
None
Example:
annotation = ifcopenshell.api.cogo.add_survey_point(file,file.createIfcCartesianPoint(4000.0,3500.0))) ifcopenshell.api.cogo.assign_surve_point(annotation,file.createIfcCartesianPoint(4000.0,3500.0,100.0))
- ifcopenshell.api.cogo.bearing2dd(bearing: str) float ¶
Converts a quadrant bearing string to decimal degrees
The format of the string is “N|S dd (mm (ss.s)) E|W” where: N|S is N or S for North or South dd is degree (required) mm is minute (optional, but required if second is provided) ss.s is second (required) E|W is E or W for East or West
- Parameters:
str – the bearing string
- Returns:
Angle in radian
- ifcopenshell.api.cogo.edit_survey_point(annotation: ifcopenshell.entity_instance, x: float, y: float, z: float = 0.0)¶
Edits the location of a previously defined survey point
- Parameters:
survey_point – The survey point
- Returns:
None
Example:
annotation = ifcopenshell.api.cogo.add_survey_point(file,file.createIfcCartesianPoint(4000.0,3500.0))) ifcopenshell.api.cogo.edit_surve_point(annotation,3500.0,2000.0)