FreeCAD Python
Functions
importIFC Namespace Reference

Detailed Description

IFC file format importer and exporter.

This module provides tools to import and export IFC files.

Functions

def getPreferences ()
 
def insert (filename, docname, skip=[], only=[], root=None)
 
def getEdgesAngle (edge1, edge2)
 
def checkRectangle (edges)
 
def getProfile (ifcfile, p)
 
def getRepresentation (ifcfile, context, obj, forcebrep=False, subtraction=False, tessellation=1)
 
def setRepresentation (representation, scaling=1000)
 

Function Documentation

◆ checkRectangle()

def importIFC.checkRectangle (   edges)
checkRectangle(edges=[]): This function checks whether the given form is a rectangle
   or not. It will return True when edges form a rectangular shape or return False
   when edges do not form a rectangular shape.

◆ getEdgesAngle()

def importIFC.getEdgesAngle (   edge1,
  edge2 
)
getEdgesAngle(edge1, edge2): returns a angle between two edges.

◆ getPreferences()

def importIFC.getPreferences ( )
retrieves IFC preferences

◆ getProfile()

def importIFC.getProfile (   ifcfile,
  p 
)
returns an IFC profile definition from a shape

◆ getRepresentation()

def importIFC.getRepresentation (   ifcfile,
  context,
  obj,
  forcebrep = False,
  subtraction = False,
  tessellation = 1 
)
returns an IfcShapeRepresentation object or None

◆ insert()

def importIFC.insert (   filename,
  docname,
  skip = [],
  only = [],
  root = None 
)
insert(filename,docname,skip=[],only=[],root=None): imports the contents of an IFC file.
skip can contain a list of ids of objects to be skipped, only can restrict the import to
certain object ids (will also get their children) and root can be used to
import only the derivates of a certain element type (default = ifcProduct).

◆ setRepresentation()

def importIFC.setRepresentation (   representation,
  scaling = 1000 
)
Returns a shape from a 2D IfcShapeRepresentation